package com.aaa.order.controller;

import com.aaa.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * fileName:OrderController
 * description:
 * author:xjf
 * createTime:2020/1/7 9:08
 * version:1.0.0
 */
@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;

    @GetMapping("orderList")
    public Object list(@RequestParam Map map){
        return orderService.getListByParam(map);
    }

    @GetMapping("orderAdd")
    public Object add(@RequestParam Map map){
        return orderService.add(map);
    }

    @GetMapping("orderUpdate")
    public Object update(@RequestParam Map map){
        return orderService.update(map);
    }

    @GetMapping("orderDelete")
    public Object delete(@RequestParam Map map){
        return orderService.delete(map);
    }
}
